package com.zhb.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("client")
public class IndexController {

	@Autowired
	DiscoveryClient discoveryClient;

	@RequestMapping("provide")
	public String provide() {
		String services = "Services: " + discoveryClient.getServices();
		System.out.println(services);
		return services;
	}

}
